﻿<%@ Page Language="VB" AutoEventWireup="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    Protected Sub Login_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If (FormsAuthentication.Authenticate(username.Text, password.Text)) Then
            FormsAuthentication.RedirectFromLoginPage(username.Text, True)
        Else
            status.InnerHtml = "Invalid Login"
        End If
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>Historical Museum</title>
</head>
<body>
    <div style="text-align: center">
    <h1>Login</h1> 
    <span id="status" style="color:red" runat="Server"/>
    <form id="Form1" runat="server">
    Username: <asp:textbox id="username" runat="Server"/><br />
    Password: <asp:textbox id="password" runat="Server" TextMode="Password" /><br />
    <asp:button id="login_button" onclick="Login_Click" text="  Login  " runat="Server"/>
    </form>
    </div>
</body>
</html>